package com.example.huainanlive

import android.content.Context
import android.util.Log
import com.tencent.live2.V2TXLivePremier
import com.tencent.rtmp.TXLiveBase

object LivePlayRoom {
    fun initPlay(context: Context){
        val licenceURL = "https://license.vod2.myqcloud.com/license/v2/1309148051_1/v_cube.license" // 获取到的 licence url
        val licenceKey = "3d9a908369bb8fc18f390a266d8f79e5" // 获取到的 licence key
        TXLiveBase.getInstance().setLicence(context, licenceURL, licenceKey)
        V2TXLivePremier.setLicence(context, licenceURL, licenceKey)
        V2TXLivePremier.setObserver(object : V2TXLivePremier.V2TXLivePremierObserver() {
            override fun onLicenceLoaded(result: Int, reason: String) {
                Log.i("TAG", "onLicenceLoaded: result:$result, reason:$reason")
            }
        })
    }
}